﻿using MyLab.MyNamespace;
// 类的概念
namespace cs_basic_15
{
    class Student
    {
        public static int Amount {  get; set; }
        static Student()
        {
            Amount = 100;
        }
        public int Id { get; set; }
        public string Name { get; set; }
        public void Report()
        {
            Console.WriteLine($"我是{Id}号学生，我的名字是{Name}，学生总数是{Amount}");
        }
        public Student(int id,string name)
        {
            this.Id = id;
            this.Name = name;
            Amount++;
        }
        ~Student()
        {
            Console.WriteLine("析构器执行了");
        }
    }
    internal class Program
    {
        static void Main(string[] args)
        {
            Student stu = new Student(7,"张三");
            stu.Report();
            Calculator calculator = new Calculator();
            double result = calculator.Add(1.1, 2.2);
            Console.WriteLine(result);
        }
    }
}
